From: Eric S. Raymond Date: Sat, 27 Mar 1993 01:58:24 +0000 (+0000) Subject: (enable-and-notify) Added. Inspired by Roland McGrath's LCD package X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~96681 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=b0912e2d9b3759d2e51ed7e23d1fe40c3325d717;p=emacs.git (enable-and-notify) Added. Inspired by Roland McGrath's LCD package enable-me. --- diff --git a/lisp/novice.el b/lisp/novice.el index 2ddbbac3250..28ba34d206f 100644 --- a/lisp/novice.el +++ b/lisp/novice.el @@ -120,4 +120,13 @@ to future sessions." (insert "(put '" (symbol-name command) " 'disabled t)\n") (save-buffer))) +;;;###autoload +(defun enable-and-notify (&rest args) + "A novice hook for non-novices." + (put this-command 'disabled nil) + (message "You typed %s. %s was disabled. It's enabled now." + (key-description (this-command-keys)) this-command) + (sit-for 0) + (call-interactively this-command)) + ;;; novice.el ends here